<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>OA</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="../../css/lib/mui/mui.css">
		<link rel="stylesheet" type="text/css" href="../../css/common/animate.css">
		<link rel="stylesheet" type="text/css" href="../../css/common/common.css"/>
			<style>
				p{
					font-size: 17px;
					color: #000000;
				}
			</style>
	</head>

	<body style="background-color: #FFFFFF;height: 100%;">
		<header class="header-backcolor mui-bar mui-bar-nav" >
			<a id="title_icon" class="mui-action-back  pan_header_a_left" >
					<img id="back_img" src="../../img/menu/ico_return.png" class="pan_header_left_img_block" >
					<button class="mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
						<span class="pan_header_left_span_block" id="back">返回</span>
					</button>
			</a>
			<h1 class="mui-title">详情</h1>
		</header>
		<div id="content"  class="mui-content" style="padding-top: -15px;background-color: #FFFFFF;">
			<h3 id="title"  style="text-align: center;"></h3>
			<div id="time" style="text-align: center;padding-right: 10px;color: #999999;font-size: 12px;"></div>
			<div id="container" style="padding: 15px 10px 0px 10px;font-size: 16px;overflow: hidden;"></div>
		    <div id="loading">
				<div class="load1" style="background-color: #FFFFFF;height: 30px;">
					<div class="loader">Loading...</div>
				</div>
				<div style="margin: 0 auto;text-align: center;font-size: 14px;color: #666;"></div>
			</div>
		</div>
	</body>
	<script src="../../js/mui.min.js"></script>
	
	<script type="text/javascript" src="../../js/common/config.js" ></script>
	<script type="text/javascript" src="../../js/lib/mui/mui.js"></script>
	<script type="text/javascript" src="../../js/lib/jquery/jquery.js"></script>
	<script type="text/javascript" src="../../js/common/common.js" ></script>
	<script type="text/javascript" src="../../js/lib/jquery/jquery.json.js" ></script> 
	
	<script>
		mui.init({
			swipeBack:false, //启用右滑关闭功能
			keyEventBind: {
				backbutton: false  //关闭back按键监听
			}
		}); 
		mui.plusReady(initSomething);
		var userid ;
		function initSomething(){
			userid = common.utils.getUserId();
		    common.utils.iflogin(userid);//判断是否登陆
			var self = plus.webview.currentWebview();
			var dataId = self.dataId;
			getInfo(dataId);
		}
		function getInfo(id){
		    mui.ajax(ctx+'mobile/common/getContent?id='+id,{
		        dataType:'json',
		        type:'post',
		        timeout:10000,
		        success:function(data){
			       	if(data && data.success){
			      		insertHtml(data.data);
			      	}else{
			      		alert('服务器异常链接失败!');
			      	}
		      	},
		      	error:function(xhr,type,errorThrown){
			     	alert('服务器异常链接失败!');
		      	}
		    });
		}
		
		function insertHtml(data){
			$("#title").html(data.title);
			$("#time").html(data.publish_time);
			$("#container").html(data.content);
			$("#loading").hide();
		}
	</script>
</html>